package thread;

public class MyRunnable implements Runnable {

	@Override
	public void run() {
		for(int i = 0;i<5;i++){
			System.out.println("run:" + i);
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
	public static void main(String[] args) {
		MyRunnable mr = new MyRunnable();
		Thread t = new Thread(mr);
		t.start();
		for(int i = 0;i< 5;i++){
			System.out.println("main:"+ i);
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			
		}
	}
}
